package com.wtc.homework;

/**
 * @author 马可
 * @version 1.0
 * 编程题3：内部类
 * 2023/5/10
 * IntelliJ IDEA
 */
public class Homework04 {
    public static void main(String[] args) {
        A a = new A();
        a.new B().show();
    }
}
class A {
    private String name = "可凡";
    class B {
        private final String name = "马可";
        public void show() {
            System.out.println("内部类姓名：" + name);
            System.out.println("外部类姓名：" + A.this.name);
        }
    }
}
